import Cookies from 'js-cookie'

// token值的key
const TokenKey = 'hr_token'

// 定义一个时间戳key
const TimeKey = 'hr_time_key'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

export function getTiem() {
  return Cookies.get(TimeKey)
}

export function setTime() {
  return Cookies.set(TimeKey, (new Date()).getTime())
}

export function removeTime() {
  return Cookies.remove(TimeKey)
}
